package ONLINE_EXAM;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class baidu1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str ;
        while ((str = br.readLine())!= null){
            String[] strs = str.split("|");
            int N = strs[0].length();
            int[][] num = new int[N][N];

            StringBuffer res = new StringBuffer();
            char template = str.charAt(0);
            res.append(template);


            for (int i = 1; i < str.length(); i++) {

                if (str.charAt(i) != template){
                    res.append(str.charAt(i));
                    template = str.charAt(i);
                }

            }

            System.out.println(res.toString());
        }
    }
}
